Table of Contents
Block Model

Overview

EO.Pdf uses a block model that is very similar to that of HTML. An AcmContent object is either an inline object or a block object.

An inline object flows horizontally in a line. When the line reaches the end, it flows to the next line. A typical inline object is AcmText. If you place one AcmText object after another, it would appear right next to the previous AcmText object in the same line.

A block object flows vertically. A typical block object is AcmTable. If you place a AcmTable object after an AcmText object (which is an inline object), it will immediately close the text line and places the table below the text. All block objects derives from AcmBlock class.

A block object can also be "floated". A floated block allows you to absolute position a block in the page and also places inline contents side by side with the block object, for example, to have an image in the middle of the page and text around it. See more for floating blocks.

Margin, Border and Padding

Each content object can optionally have a margin, border or padding. They have slightly different meanings depending on whether the object is an inline object or a block object. The following diagram illustrates these settings for a block object:

These settings have slightly different meanings for an inline object. The following diagram illustrates how these settings are applied on an inline object that spans into three lines:

The most important difference is while border settings are only applied on the out bound of the whole object, paddings are applied on all lines. Margins are applied the same way as borders(not shown in the above diagram). It is not recommended to use margins when the contents may span into multiple lines.